import os
Import ("*")

lib_name = "bs_scal"
tar_name = "bs_scal"

env = custom_env.Clone ()
env.Append (CPPPATH = ["include",
    includes["bs_bos_core_base"],
    includes["bs_bos_core_data_storage"],
    includes["bs_bos_core"],
    includes["common_types"],
    includes["common_alg"],
    ] + includes["kernel"])

libs = ["blue_sky", "bs_bos_core_base", "common_types",
        "bs_bos_core_data_storage",
        ]

boost_libs = ["serialization"]
boost_libs = list_suffix(list_prefix(boost_libs, 'boost_'), env["boost_suffix"]);

if (build_kind == "debug") :
    env.AppendUnique (LIBS = list_suffix (libs, "_d"))
    env.AppendUnique (LIBS = list_suffix(boost_libs, '-d'))
    lib_name += "_d"
elif (build_kind == "release") :
    env.AppendUnique (LIBS = libs)
    env.AppendUnique (LIBS = boost_libs)

bs_scal = env.SharedLibrary (target = os.path.join (tar_exe_plugin_dir, lib_name), source = files (["."]).sources)

env.Alias (tar_name, bs_scal)
Export ("bs_scal")

if (env["install"] == 1) :
    inst_tar = env.Install ("$plugins_prefix", bs_scal)
    env.Alias (tar_name, inst_tar)


